﻿<dxc:DXWindow x:Class="ThanNhanTao.frmThongBaoHanBHYT"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:common="clr-namespace:ThanNhanTao.CommonControl"
        dxc:ThemeManager.ThemeName="Office2007Blue"
        Title="Thông báo những bệnh nhân hết hạn BHYT" Height="400" Width="700"
        WindowStartupLocation="CenterScreen"
        KeyDown="DXWindow_KeyDown">
    <dxc:DXWindow.Resources>
        <Style TargetType="Label">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style TargetType="dxe:CheckEdit">
            <Setter Property="Margin" Value="2,2" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="1,1" />
        </Style>
    </dxc:DXWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="10"></RowDefinition>
            <RowDefinition Height="35"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="6"></RowDefinition>
            <RowDefinition Height="28"></RowDefinition>
        </Grid.RowDefinitions>
        <Label Name="lblSoNgayHetHan" Foreground="Red" FontSize="18" FontWeight="Bold"  Content="Thông báo trước 0 ngày so với thời gian hết hạn BHYT" Grid.Row="1">
        </Label>
        <dxg:GridControl  Grid.Column="1" Grid.Row="2" Name="gridBenhNhan">
            <dxg:GridControl.Columns>
                <dxg:GridColumn Header="Mã NV" FieldName="SoNhapVien" Width="60"
                                        AutoFilterCondition="Contains"/>
                <dxg:GridColumn Header="Họ" FieldName="Ho" />
                <dxg:GridColumn Header="Tên" FieldName="Ten" Width="60"/>
                <dxg:GridColumn Header="Tuổi" FieldName="Tuoi" Width="50">
                    <dxg:GridColumn.CellTemplate>
                        <DataTemplate>
                            <dxe:TextEdit Text="{Binding Value}" HorizontalAlignment="Left" EditMode="InplaceInactive"/>
                        </DataTemplate>
                    </dxg:GridColumn.CellTemplate>
                </dxg:GridColumn>
                <dxg:GridColumn FieldName="GioiTinh" Header="Giới tính" Width="70">
                    <dxg:GridColumn.CellTemplate>
                        <DataTemplate>
                            <dxe:TextEdit Text="{Binding Value, Converter={common:GioiTinhConverterToString}}" HorizontalAlignment="Left" EditMode="InplaceInactive" />
                        </DataTemplate>
                    </dxg:GridColumn.CellTemplate>
                </dxg:GridColumn>
                <dxg:GridColumn Header="Số BHYT" FieldName="SoBHYT" Width="125" AutoFilterCondition="Contains"/>
                <dxg:GridColumn Header="Đến ngày" FieldName="DenNgay" Width="80" AutoFilterCondition="Contains" />
                <dxg:GridColumn Header="Khu vực" FieldName="MLPrismaflex" Width="70"/>
            </dxg:GridControl.Columns>
            <dxg:GridControl.TotalSummary>
                <dxg:GridSummaryItem FieldName="Ho" SummaryType="Count" DisplayFormat=" {0:n0} bệnh nhân"/>
            </dxg:GridControl.TotalSummary>
            <dxg:GridControl.View>
                <dxg:TableView ShowAutoFilterRow="True" NavigationStyle="Row"
                                           ShowGroupedColumns="False" ShowColumnHeaders="True" 
                                           ShowGroupPanel="False" AutoWidth="True" AllowEditing="False" 
                                           AllowDrop="False" AllowGrouping="False" AllowMoveColumnToDropArea="False" 
                                           AllowMoving="False" IsColumnMenuEnabled="False" IsDeferredScrolling="False" 
                                           IsGroupPanelMenuEnabled="False" IsRowCellMenuEnabled="True"
                                           IsTotalSummaryMenuEnabled="False" ShowTotalSummary="True"
                                            MouseDoubleClick="TableView_MouseDoubleClick">
                </dxg:TableView>
            </dxg:GridControl.View>
        </dxg:GridControl>
        <Button Content="Đó_ng" Name="btnDong" Click="btnDong_Click" FontWeight="Bold" Grid.Row="4"></Button>
    </Grid>
</dxc:DXWindow>
